<%-- 
    Document   : dojo1
    Created on : 2008-11-28, 0:44:35
    Author     : kanghui
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<script type="text/javascript">
    var djConfig = {
        isDebug:false, parseOnLoad:false
    };
</script>
<style type="text/css">
    .testClass {
        background-color:red;
    }

</style>
 <style type="text/css">
            .log {
                top:600px;
                width:800px;
                height:auto;
                border:1px solid red  
            }
        </style>
<script src="http://192.168.1.175/dojo/dojo.js"></script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        
     <div id="logInfo" class="log">

      </div>
        <script type="text/javascript">
                dojo.require("dojox.lang.functional");
                var df = dojox.lang.functional;
                values = [1,2,3,4,5];
                dojo.addOnLoad(function(){
                      var sum = df.reduce(values,"+");
                      log(sum);
                });
                
                function log(str){
                       
                         dojo.byId('logInfo').innerHTML += str;
                         dojo.byId('logInfo').innerHTML += '<br/>';
                }

        </script>
      
    </body>
</html>
